# from django.contrib import admin
from django.urls import path, include, re_path

from users.views import LoginView, RegisterView, LogoutView, ActiveUserView, ForgetView, EditUserInfo, ProfileView
from users.views import get_profile_json


urlpatterns = [
    # path('admin/', admin.site.urls),
    # 用户登录
    path('login/', LoginView.as_view(), name="user_login"),
    # 用户注册
    # path('register/', RegisterView.as_view(), name="user_register"),
    # 忘记密码
    # path('forgetpwd/', ForgetView.as_view(), name="user_forget"),
    # 用户登出
    path('logout/', LogoutView.as_view(), name="user_logout"),
    # 用户修改密码
    path('edit/', EditUserInfo.as_view(), name="user_edit"),
    # 确认邮件
    re_path(r'^active/(?P<active_code>.*)/$', ActiveUserView.as_view(), name="user_active"),
    # 用户个人中心
    path('profile/', ProfileView.as_view(), name="user_profile"),

    # 用户个人信息json
    path('profile_json/', get_profile_json, name="profile_json"),
]